package com.yuju.log.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yuju.common.core.dao.IBaseDao;
import com.yuju.common.core.service.AbstractBaseService;
import com.yuju.log.dao.ILogBizRecordDao;
import com.yuju.log.dao.entity.LogBizRecord;
import com.yuju.log.model.LogBizRecordModel;
import com.yuju.log.service.ILogBizRecordService;
import com.yuju.util.Utils;

/**
 * 
 * 类名：LogBizRecordServiceImpl  <br />
 *
 * 功能：业务日志Service实现
 *
 * @author : xuehj <br />
 * @Date : 2018年1月2日 下午5:05:28  <br />
 * @version : 1.1 <br />
 */
@Service
public class LogBizRecordServiceImpl extends AbstractBaseService<LogBizRecordModel, LogBizRecord, String> implements ILogBizRecordService {
	@Autowired
	private ILogBizRecordDao logBizRecordDao;
	@Override
	public IBaseDao<LogBizRecordModel, LogBizRecord, String> getDao() {
		// TODO Auto-generated method stub
		return logBizRecordDao;
	}
	
	public int save(LogBizRecordModel logBizRecordModel){
		logBizRecordModel.setId(Utils.getUUID());
		Date date = new Date();
		logBizRecordModel.setGmtCreate(date);
		logBizRecordModel.setGmtModified(date);
		
		return super.save(logBizRecordModel);
	}

}
